def factorial_sum(input_num):
    if input_num <= 1:
        return 1
    return input_num * factorial_sum(input_num - 1)


def factorial_sum_2(input_num):
    if input_num <= 1:
        return 1
    for i in range(input_num - 1, 0, -1):
        input_num = input_num * i
    return input_num


print("factorial value:{}".format(factorial_sum(5)))
print("factorial value:{}".format(factorial_sum_2(5)))
